/**
 * Created by Administrator on 2017/6/29.
 */

import React from 'react'
import {View,Text,TouchableOpacity,Image} from 'react-native'

export default class MessageDetails extends React.Component{

    static navigationOptions = ({navigation}) =>{
        const {goBack,navigate} = navigation;
        return{
            headerStyle: {
                height: 70,
                backgroundColor: '#F1982F',
            },
            title: '消息详情',
            headerTitleStyle: {
                color: '#FFFFFF',
                alignSelf: 'center',
                marginTop: 25,
                marginLeft: -10,
            },
            headerLeft: <TouchableOpacity style={{marginLeft: 10, marginTop: 25}} onPress={() => goBack()}>
                <Image source={require('../.././Img/btn_fanhui@2x.png')}/>
            </TouchableOpacity>
        }
    }

    render(){
        var a = '       '+this.props.navigation.state.params.user.content
        return(
            <View style={{flex:1,backgroundColor:'#fff'}}>
                <Text style={{margin:16,fontSize:18,color:'#cfa626'}}>{this.props.navigation.state.params.user.title }</Text>
                <Text style={{marginLeft:16,fontSize:14}}>{this.props.navigation.state.params.user.createdAt }</Text>
                <Text style={{margin:16,fontSize:15}}>{a}</Text>
            </View>
        )
    }
}